﻿using System;
using System.Collections.Generic;
using System.Text;

namespace StatusPattern
{
    /// <summary>
    /// 通电
    /// </summary>
    public class Electrified: BaseElectric
    {
        public Electrified()
        {
            base.ElectricStatus = ElectricType.open;
        }


        public override void Turn(Context context)
        {
            context.CurrentElectric =  new CutoutElectric();
        }



        public override void Run()
        {

            Console.WriteLine($"开关的状态是{base.ElectricStatus},电车开始运行");
        }
    }
}
